package com.simon.train.business.controller.web;


import com.simon.train.business.service.TrainService;
import com.simon.train.business.vo.DailyTrainQueryVO;
import com.simon.train.common.Result.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/web/train")
public class TrainController {

    @Resource
    private TrainService trainService;

    /**
     * 查询全部的列车信息
     * @return
     */
    @GetMapping("/queryDailyAll")
    public Result<List<DailyTrainQueryVO>> TrainQueryList(){
        List<DailyTrainQueryVO> lists = trainService.QueryTrainDailyAll();
        return new Result<>(lists);
    }


}
